<extend name="Common/list-base" />
<block name="search">
    <div class="input-group">
        <span class="text-icon"> 搜 索 </span><input name="name" type="text" value="{$Think.get.name|default=''}" size="25">
    </div>
    <div class="input-group">
        <span class="text-icon"> 类 型 </span><select name="type">
        <option value="">全部类型</option>
        <option value="1" <present name="Think.get.type"><eq name="Think.get.type" value="1">selected</eq></present> >图片</option>
        <option value="2" <present name="Think.get.type"><eq name="Think.get.type" value="1">selected</eq></present> >缩略图</option>
        </select>
    </div>
</block>
<block name="action">
    <a class="AjaxGet btn btn-blue" data-url="{:U('clear')}" href="javascript:;">清理沉余附件</a>
</block>
<block name="list">
<tr>
	<th>附件名称</th>
	<th>附件路径</th>
    <th width="50" class="tc">使用</th>
    <th width="50" class="tc">类型</th>
	<th width="100" class="tc">大小</th>
	<th width="150" class="tc">上传日期</th>
    <th width="100">操作</th>
</tr>
<foreach name="list" item="v">
<tr>

    <td><a href="__ROOT__/Uploads/{$v.path}/{$v.name}.{$v.ext}" target="_blank">{$v.title}</a></td>
    <td><neq name="v.type" value="0"><a class="AjaxImage" data-url="__ROOT__/Uploads/{$v.path}/{$v.name}.{$v.ext}" href="javascript:;"><img src="__ROOT__/Uploads/{$v.path}/{$v.name}.{$v.ext}" width="100" height="30"></a><else/><a href="__ROOT__/Uploads/{$v.path}/{$v.name}.{$v.ext}" target="_blank">__ROOT__/Uploads/{$v.path}/{$v.name}.{$v.ext}</a></neq></td>
    <td class="tc">{$v['table_id']?'使用':'沉余'}</td>
    <td class="tc">{$int_type[$v['type']]}</td>
    <td class="tc">{:format_bytes($v['size'])}</td>
    <td class="tc">{$v.upload_date}</td>
    <td>
        <a class="AjaxHtml btn btn-blue" data-url="{:U('edit?id='.$v['id'])}" href="javascript:;">修改</a>
    </td>
</tr>
</foreach>
</block>